package com.dailyblue.example.project.bookstore.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dailyblue.example.project.bookstore.commons.bean.User;
import com.dailyblue.example.project.bookstore.commons.util.JsonResult;

import javax.servlet.http.HttpServletRequest;

public interface UserService extends IService<User> {
    JsonResult login(User user);

    JsonResult logout(String token);

    JsonResult register(User user);

    JsonResult addCart(String bookId, HttpServletRequest request);

    JsonResult showCart(HttpServletRequest request);

    JsonResult changeCartNumber(String bookId, HttpServletRequest request, int number);

    JsonResult changeCartNumber2(String bookId, HttpServletRequest request, int number);

    JsonResult deleteCartById(HttpServletRequest request, String... bookIds);

    JsonResult syncShoppingCart();
}
